<template>
  <van-image v-bind="{ width: '100%', height: '100%', ...$attrs }" v-on="$listeners">
    <template v-for="(o, slot) in $slots" #[slot]>
      <slot :name="slot" />
    </template>

    <template #loading>
      <slot name="loading">
        <van-loading type="spinner" size="20" />
      </slot>
    </template>
  </van-image>
</template>

<script>
import Vue from 'vue'
import { Lazyload } from 'vant'
Vue.use(Lazyload)
export default {
  name: 'VanImg',
  inheritAttrs: false
}
</script>
